package com.example.mallsystem1104.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mallsystem1104.entity.Address;
import com.example.mallsystem1104.mapper.AddressMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author zy
 * @Date 2024/12/12 17:18
 * @packageName:com.example.mallsystem1104.service
 * @ClassName:AddressService
 */
@Service
public class AddressService extends ServiceImpl<AddressMapper, Address> {
    @Resource AddressMapper addressMapper;
    public List<Address> findAllById(Long userId) {
        QueryWrapper<Address> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("user_id",userId);
        return list(queryWrapper);
    }
}
